function columns(vm) {
  const cols = [
    {
      title: '序号',
      key: 'rowIndex',
      width: 60,
      align: 'center',
      customRender: function (text, row, index) {
        if (row.totalName == '合计') {
          return {
            children: vm.transformVnode('合计'),
            attrs: {
              colSpan: 3,
            },
          }
        } else {
          if (row.serialnumber)
            return undefined
          return (vm.ipagination.current - 1) * 10 + Number(index - 1)
        }
      }
    },
    {
      title: '实施单位',
      align: 'center',
      children: [
        {
          title: '二级单位',
          align: 'center',
          dataIndex: 'ejdw',
          key: 'ejdw',
          customRender: function (text, row, index) {
            if (row.totalName == '合计') {
              return {
                attrs: {
                  colSpan: 0,
                },
              }
            } else if (row.serialnumber) {
              return {
                attrs: {
                  colSpan: 2,
                },
                children: text
              }
            }
            else {
              return {
                children: vm.TransformVnodeEllipsis(text,row,'ejdw')
              }
            }
          }
        },
        {
          title: '总包部/指挥部',
          align: 'center',
          dataIndex: 'zbbzhb',
          key: 'zbbzhb',
          customRender: function (text, row, index) {
            if (row.totalName == '合计' || row.serialnumber) {
              return {
                attrs: {
                  colSpan: 0,
                },
              }
            } else {
              return {
                children: vm.TransformVnodeEllipsis(text,row,'zbbzhb')
              }
            }
          }
        },
      ]
    },
    {
      title: '项目名称',
      align: 'center',
      dataIndex: 'xmmc',
      key: 'xmmc',
      scopedSlots: { customRender: 'xmmc' },
    },
    {
      title: '项目所在地（省市）',
      align: 'center',
      dataIndex: 'xmszd',
      key: 'xmszd',
      scopedSlots: { customRender: 'xmszd' },
    },
    {
      title: '项目类型',
      align: 'center',
      dataIndex: 'xmlx',
      key: 'xmlx',
      scopedSlots: { customRender: 'xmlx' },
    },
    {
      title: '业主名称',
      align: 'center',
      dataIndex: 'yzmc',
      key: 'yzmc',
      scopedSlots: { customRender: 'yzmc' },
    },
    {
      title: '项目状态（久竣未结/已竣未结/已竣已结）',
      align: 'center',
      dataIndex: 'xmzt',
      key: 'xmzt',
      scopedSlots: { customRender: 'xmzt' },
    },
    {
      title: '是否已列入股份公司专项治理清单',
      align: 'center',
      dataIndex: 'sfgfgs',
      key: 'sfgfgs',
      scopedSlots: { customRender: 'sfgfgs' },
    },

    {
      title: '工期情况',
      align: 'center',
      children: [
        {
          title: '合同开工日期',
          align: 'center',
          dataIndex: 'kgrq',
          key: 'kgrq',
          scopedSlots: { customRender: 'kgrq' },
        },
        {
          title: '合同完工日期',
          align: 'center',
          dataIndex: 'wgrq',
          key: 'wgrq',
          scopedSlots: { customRender: 'wgrq' },
        },
        {
          title: '实际开工日期',
          align: 'center',
          dataIndex: 'sjkgrq',
          key: 'sjkgrq',
          scopedSlots: { customRender: 'sjkgrq' },
        },
        {
          title: '竣工验收日期',
          align: 'center',
          dataIndex: 'jgysrq',
          key: 'jgysrq',
          scopedSlots: { customRender: 'jgysrq' },
        },
        {
          title: '停工日期',
          align: 'center',
          dataIndex: 'tgrq',
          key: 'tgrq',
          scopedSlots: { customRender: 'tgrq' },
        },
        {
          title: '最近一期验工计价日期',
          align: 'center',
          dataIndex: 'ygjjrq',
          key: 'ygjjrq',
          scopedSlots: { customRender: 'ygjjrq' },
        },
      ]
    },

    {
      title: '投资额情况',
      align: 'center',
      children: [
        {
          title: '合同约定投资规模',
          align: 'right',
          dataIndex: 'tzgm',
          key: 'tzgm',
          scopedSlots: { customRender: 'tzgm' },
        },
        {
          title: '项目（预计）总投资额',
          align: 'right',
          dataIndex: 'ztze',
          key: 'ztze',
          scopedSlots: { customRender: 'ztze' },
        },
        {
          title: '累计完成投资额',
          align: 'center',
          children: [
            {
              title: '建安投资',
              align: 'right',
              dataIndex: 'jatz',
              key: 'jatz',
              scopedSlots: { customRender: 'jatz' },
            },
            {
              title: '非建安投资',
              align: 'right',
              dataIndex: 'fjatz',
              key: 'fjatz',
              scopedSlots: { customRender: 'fjatz' },
            },
          ]
        },
        {
          title: '主管部门批复投资概算',
          align: 'right',
          dataIndex: 'tzgs',
          key: 'tzgs',
          scopedSlots: { customRender: 'tzgs' },
        },
      ]
    },
    {
      align: 'center',
      slots: { title: 'endTimeTitleA' },
      children: [
        {
          title: '已计价',
          align: 'right',
          dataIndex: 'yjj',
          key: 'yjj',
          scopedSlots: { customRender: 'yjj' },
        },
        {
          title: '待批复变更索赔',
          align: 'right',
          dataIndex: 'dpfbgsp',
          key: 'dpfbgsp',
          scopedSlots: { customRender: 'dpfbgsp' },
        },
      ]
    },
    {
      align: 'center',
      slots: { title: 'endTimeTitleB' },
      children: [
        {
          title: '合同额',
          align: 'right',
          dataIndex: 'hte',
          key: 'hte',
          scopedSlots: { customRender: 'hte' },
        },
        {
          title: '已计价（含变更调差等）',
          align: 'right',
          dataIndex: 'yjjbgtz',
          key: 'yjjbgtz',
          scopedSlots: { customRender: 'yjjbgtz' },
        },
        {
          title: '已完未计（含变更调差等）',
          align: 'right',
          dataIndex: 'ywwjbgtz',
          key: 'ywwjbgtz',
          scopedSlots: { customRender: 'ywwjbgtz' },
        },
        {
          title: '各参建单位简称',
          align: 'center',
          dataIndex: 'cjdwjc',
          key: 'cjdwjc',
          scopedSlots: { customRender: 'cjdwjc' },
        },
      ]
    },
    {
      align: 'center',
      slots: { title: 'endTimeTitleC' },
      children: [
        {
          title: '实际收到工程款',
          align: 'right',
          dataIndex: 'sjgck',
          key: 'sjgck',
          scopedSlots: { customRender: 'sjgck' },
        },
        {
          title: '支付参建单位工程款',
          align: 'right',
          dataIndex: 'cjgck',
          key: 'cjgck',
          scopedSlots: { customRender: 'cjgck' },
        },
        {
          title: '应收账款-工程款',
          align: 'right',
          dataIndex: 'yszkGck',
          key: 'yszkGck',
          scopedSlots: { customRender: 'yszkGck' },
        },
        {
          title: '长期应收款-工程款',
          align: 'right',
          dataIndex: 'cqyszGck',
          key: 'cqyszGck',
          scopedSlots: { customRender: 'cqyszGck' },
        },
      ]
    },

    {
      title: '政府审计情况',
      align: 'center',
      children: [
        {
          title: '送审时间',
          align: 'center',
          dataIndex: 'sssj',
          key: 'sssj',
          scopedSlots: { customRender: 'sssj' },
        },
        {
          title: '审定金额',
          align: 'center',
          dataIndex: 'sdje',
          key: 'sdje',
          scopedSlots: { customRender: 'sdje' },
        },
      ],
    },
    {
      title: '未完成竣工结算原因、工作目标、下一步措施简述（另附书面说明）',
      align: 'center',
      dataIndex: 'reason',
      key: 'reason',
      scopedSlots: { customRender: 'reason' },
    },
    {
      title: '备注',
      align: 'center',
      dataIndex: 'remark',
      key: 'remark',
      scopedSlots: { customRender: 'remark' },
    },
    {
      dataIndex: 'submitFlag',
      align: 'center',
      title: "状态",
      scopedSlots: { customRender: 'submitFlag' },
      key: 'submitFlag',
      fixed: 'right',
      width: 80,
    },
    {
      dataIndex: 'action',
      align: 'center',
      title: "操作",
      scopedSlots: { customRender: 'action' },
      key: 'action',
      width: 100,
      fixed: 'right',
    }
  ]
  return cols
}

export default columns